<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 优先级 2 */
    .main .p {
      color: green;
    }
    /* 优先级 1 */
    :is(main, .main) .p {
      color: hotpink;
    }
    /* 优先级 3 */
    :where(main, .main) .p {
      color: red;
    }
    /* 优先级 4 */
    p {
      color: sienna;
    }
  </style>
</head>
<body>
  <main class="main">
    <p class="p">Hi :is :where</p>
  </main>
</body>
</html>